package com.middlegroup.payadmin;

import at.pollux.thymeleaf.shiro.dialect.ShiroDialect;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * 主程序启动类
 *
 * @author pc
 */
@SpringBootApplication
@ComponentScan("com.middlegroup")
@MapperScan("com.middlegroup.payadmin.mapper")
@EnableTransactionManagement
@EnableCaching
public class PayadminApplication {

    public static void main(String[] args) {
        SpringApplication.run(PayadminApplication.class, args);
    }

/*    static public class SpringContextUtil {

        private static ApplicationContext applicationContext;

        public static ApplicationContext getApplicationContext() {
            return applicationContext;
        }

        private static void setApplicationContext(ApplicationContext applicationContext) {
            SpringContextUtil.applicationContext = applicationContext;
        }

        public static Object getBean(String name) {
            return applicationContext.getBean(name);
        }

        public static <T> T getBean(Class<T> requiredType) {
            return applicationContext.getBean(requiredType);
        }
    }*/

}
